package com.petadoption.serverclient.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.petadoption.serverclient.entity.Productdescr;
import com.petadoption.serverclient.mapper.ProductDescrMapper;
import com.petadoption.serverclient.service.IProductDescrService;
import com.petadoption.serverclient.vo.ProductdescrVO;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service
public class ProductDescrServiceImpl extends ServiceImpl<ProductDescrMapper, Productdescr> implements IProductDescrService {

    @Resource
    private ProductDescrMapper productDescrMapper;

    @Override
    public List<ProductdescrVO> findProductDescrById(Integer productId) {
        QueryWrapper queryWrapper = new QueryWrapper<>().eq("product_id", productId);
        return productDescrMapper.selectList(queryWrapper);
    }
}
